<!-- SAML Client -->
<div class="saml-client-container" ng-show="serviceFormCtrl.serviceData.type=='saml'">
    <div class="panel panel-warning">
        <div class="panel-heading">
            <h3 class="panel-title">
                <span th:remove="tag" th:text="#{services.form.header.samlclient}"/>
            </h3>
        </div>
        <div class="panel-body">

            <!--Metadata Location: text-->
            <div class="form-group">

                <label class="col-sm-4" for="samlMetadataLocation">
                    <span th:remove="tag" th:text="#{services.form.label.saml.metadata.location}"/>
                    <i class="fa fa-lg fa-question-circle form-tooltip-icon"
                       data-toggle="tooltip"
                       data-placement="top"
                       th:title="#{services.form.tooltip.saml.metadata.location}"></i>
                </label>

                <div class="col-sm-8">
                    <div class="input-group">
                        <div class="input-group-addon input-group-required" th:title="#{services.form.required}">
                            <i class="fa fa-exclamation-triangle"></i>
                        </div>

                        <input type="text" autocomplete="off" class="form-control" id="samlMetadataLocation"
                               ng-model="serviceFormCtrl.serviceData.saml.mdLoc"/>
                    </div>
                </div>

            </div>

            <!--Metadata Maximum Validity: integer-->
            <div class="form-group">
                <label class="col-sm-4" for="samlMetadataMaxValidity">
                    <span th:remove="tag" th:text="#{services.form.label.saml.metadata.maximumvalidity}"/>
                    <i class="fa fa-lg fa-question-circle form-tooltip-icon"
                       data-toggle="tooltip"
                       data-placement="top"
                       th:title="#{services.form.tooltip.saml.metadata.maximumvalidity}"></i>
                </label>
                <div class="col-sm-8">
                    <input type="text" autocomplete="off" class="form-control" id="samlMetadataMaxValidity"
                           ng-model="serviceFormCtrl.serviceData.saml.mdMaxVal"/>
                </div>
            </div>

            <!--Authentication Context Class: text-->
            <div class="form-group">
                <label class="col-sm-4" for="samlAuthContextClass">
                    <span th:remove="tag" th:text="#{services.form.label.saml.authenticationcontextclass}"/>
                    <i class="fa fa-lg fa-question-circle form-tooltip-icon"
                       data-toggle="tooltip"
                       data-placement="top"
                       th:title="#{services.form.tooltip.saml.authenticationcontextclass}"></i>
                </label>
                <div class="col-sm-8">
                    <input type="text" autocomplete="off" class="form-control" id="samlAuthContextClass"
                           ng-model="serviceFormCtrl.serviceData.saml.authCtxCls"/>
                </div>
            </div>

            <!--Metadata Signature Public Key Location: text-->
            <div class="form-group">
                <label class="col-sm-4" for="samlMetadataPublicKeyLocation">
                    <span th:remove="tag" th:text="#{services.form.label.saml.metadata.signaturepublickeylocation}"/>
                    <i class="fa fa-lg fa-question-circle form-tooltip-icon"
                       data-toggle="tooltip"
                       data-placement="top"
                       th:title="#{services.form.tooltip.saml.metadata.signaturepublickeylocation}"></i>
                </label>
                <div class="col-sm-8">
                    <input type="text" autocomplete="off" class="form-control" id="samlmetadatapublickeylocation"
                           ng-model="serviceFormCtrl.serviceData.saml.mdSigLoc"/>
                </div>
            </div>

            <div class="form-group">
                <div class="col-md-8 col-md-offset-4">
                    <!--Sign Assertions: true/false-->
                    <div class="checkbox">
                        <label for="samlSignAssertions">
                            <input type="checkbox" id="samlSignAssertions"
                                   ng-model="serviceFormCtrl.saml.signAssert"/>
                            <span th:remove="tag" th:text="#{services.form.label.saml.signassertions}"/>
                            <i class="fa fa-lg fa-question-circle form-tooltip-icon no-float"
                               data-toggle="tooltip"
                               data-placement="top"
                               th:title="#{services.form.tooltip.saml.signassertions}"></i>
                        </label>
                    </div>
                    <!--Sign Responses: true/false-->
                    <div class="checkbox">
                        <label for="samlSignResponses">
                            <input type="checkbox" id="samlSignResponses"
                                   ng-model="serviceFormCtrl.serviceData.saml.signResp"/>
                            <span th:remove="tag" th:text="#{services.form.label.saml.signresponses}"/>
                            <i class="fa fa-lg fa-question-circle form-tooltip-icon no-float"
                               data-toggle="tooltip"
                               data-placement="top"
                               th:title="#{services.form.tooltip.saml.signresponses}"></i>
                        </label>
                    </div>
                    <!--Encrypt Assertions: true/false-->
                    <div class="checkbox">
                        <label for="samlEncryptAssertions">
                            <input type="checkbox" id="samlEncryptAssertions"
                                   ng-model="serviceFormCtrl.serviceData.saml.encAssert"/>
                            <span th:remove="tag" th:text="#{services.form.label.saml.encryptassertions}"/>
                            <i class="fa fa-lg fa-question-circle form-tooltip-icon no-float"
                               data-toggle="tooltip"
                               data-placement="top"
                               th:title="#{services.form.tooltip.saml.encryptassertions}"></i>
                        </label>
                    </div>

                    <div class="checkbox">
                        <label for="samlRemoveEmptyEntities">
                            <input type="checkbox" id="samlRemoveEmptyEntities"
                                   ng-model="serviceFormCtrl.serviceData.saml.removeEmptyEntities"/>
                            <span th:remove="tag" th:text="#{services.form.label.saml.removeEmptyEntities}"/>
                            <i class="fa fa-lg fa-question-circle form-tooltip-icon no-float"
                               data-toggle="tooltip"
                               data-placement="top"
                               th:title="#{services.form.tooltip.saml.removeEmptyEntities}"></i>
                        </label>
                    </div>

                    <div class="checkbox">
                        <label for="samlRemoveRoleless">
                            <input type="checkbox" id="samlRemoveRoleless"
                                   ng-model="serviceFormCtrl.serviceData.saml.removeRoleless"/>
                            <span th:remove="tag" th:text="#{services.form.label.saml.removeRoleless}"/>
                            <i class="fa fa-lg fa-question-circle form-tooltip-icon no-float"
                               data-toggle="tooltip"
                               data-placement="top"
                               th:title="#{services.form.tooltip.saml.removeRoleless}"></i>
                        </label>
                    </div>
                    
                </div>
            </div>



            <div class="form-group">
                <label class="col-sm-4" for="samlMetadataPattern">
                    <span th:remove="tag" th:text="#{services.form.label.saml.metadata.pattern}"/>
                    <i class="fa fa-lg fa-question-circle form-tooltip-icon"
                       data-toggle="tooltip"
                       data-placement="top"
                       th:title="#{services.form.tooltip.saml.metadata.pattern}"></i>
                </label>
                <div class="col-sm-8">
                    <input type="text" autocomplete="off" class="form-control" id="samlMetadataPattern"
                           ng-model="serviceFormCtrl.serviceData.saml.mdPattern"/>
                </div>
            </div>
            
            <div class="form-group">
                <label class="col-sm-4" for="samlMetadataDirection">
                    <span th:remove="tag" th:text="#{services.form.label.saml.metadata.dir}" />
                    <i class="fa fa-lg fa-question-circle form-tooltip-icon" data-toggle="tooltip" data-placement="top"
                       th:title="#{services.form.tooltip.saml.metadata.dir}" ></i>
                </label>
                <div class="col-sm-8">
                    <div class="input-group">
                        <select class="form-control" id="samlMetadataDirection" ng-model="serviceFormCtrl.serviceData.saml.dir">
                            <option ng-repeat="opt in serviceFormCtrl.selectOptions.samlDirectionList" ng-attr-value="{{ opt.value }}"
                                    ng-selected="serviceFormCtrl.isSelected(opt.value, serviceFormCtrl.serviceData.saml.dir)">{{ opt.name }}</option>
                        </select>
                    </div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-4" for="samlMetadataRole">
                    <span th:remove="tag" th:text="#{services.form.label.saml.metadata.role}" />
                    <i class="fa fa-lg fa-question-circle form-tooltip-icon" data-toggle="tooltip" data-placement="top"
                       th:title="#{services.form.tooltip.saml.metadata.role}" ></i>
                </label>
                <div class="col-sm-8">
                    <div class="input-group">
                        <select class="form-control" multiple="true" id="samlMetadataRole" 
                                ng-model="serviceFormCtrl.serviceData.saml.roles">
                            <option ng-repeat="opt in serviceFormCtrl.selectOptions.samlRoleList" ng-attr-value="{{ opt.value }}"
                                    ng-selected="serviceFormCtrl.isSelected(opt.value, serviceFormCtrl.serviceData.saml.role)">{{ opt.name 
                                }}</option>
                        </select>
                    </div>
                </div>
            </div>
            
            
            
        </div>
    </div>
</div>

